{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Fair Data Adaptation\n",
    "The `FairAdapt` package provides a pre-processing method that can be used with the following workflow (both regression and classification):\n",
    "    \n",
    "    1. obtain a dataset of interest (D),\n",
    "    2. define the causal graph (G) for the dataset (see the graph of the Adult dataset below as an example),\n",
    "    3. using original data D and the causal graph G obtain a fair-transformed version of the data FT(D),\n",
    "    4. after the adaptation, use the transformed dataset FT(D) to train any classifier/regressor.\n",
    "    \n",
    "The adaptation procedure in `FairAdapt` adapts the variables in a topological order and ensures that discrimination removal is causally meaningful (under the assumption that the causal graph G is correctly specified). Additionally, the method explicitly computes what is known in the literature as _counterfactual instances_. For example, for a male individual, we can explicitly compute what his \"education level or employment status would have been, had he in fact been female\". Such reasoning can also help justify fair decision-making. \n",
    "\n",
    "In the following, we give an example of how `FairAdapt` can be used."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from lightgbm import LGBMClassifier\n",
    "import igraph\n",
    "\n",
    "from sklearn.metrics import accuracy_score\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "from aif360.sklearn.datasets import fetch_adult\n",
    "from aif360.sklearn.metrics import statistical_parity_difference\n",
    "from aif360.sklearn.preprocessing import FairAdapt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load a dataset\n",
    "We start by loading the UCI Adult dataset and inspecting it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "code_folding": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>workclass</th>\n",
       "      <th>education-num</th>\n",
       "      <th>marital-status</th>\n",
       "      <th>occupation</th>\n",
       "      <th>race</th>\n",
       "      <th>sex</th>\n",
       "      <th>hours-per-week</th>\n",
       "      <th>native-country</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>race</th>\n",
       "      <th>sex</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <th>Non-white</th>\n",
       "      <th>Male</th>\n",
       "      <td>25.0</td>\n",
       "      <td>Private</td>\n",
       "      <td>7.0</td>\n",
       "      <td>Never-married</td>\n",
       "      <td>Machine-op-inspct</td>\n",
       "      <td>Non-white</td>\n",
       "      <td>Male</td>\n",
       "      <td>40.0</td>\n",
       "      <td>United-States</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <th>White</th>\n",
       "      <th>Male</th>\n",
       "      <td>38.0</td>\n",
       "      <td>Private</td>\n",
       "      <td>9.0</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Farming-fishing</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>50.0</td>\n",
       "      <td>United-States</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <th>White</th>\n",
       "      <th>Male</th>\n",
       "      <td>28.0</td>\n",
       "      <td>Local-gov</td>\n",
       "      <td>12.0</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Protective-serv</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>40.0</td>\n",
       "      <td>United-States</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <th>Non-white</th>\n",
       "      <th>Male</th>\n",
       "      <td>44.0</td>\n",
       "      <td>Private</td>\n",
       "      <td>10.0</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Machine-op-inspct</td>\n",
       "      <td>Non-white</td>\n",
       "      <td>Male</td>\n",
       "      <td>40.0</td>\n",
       "      <td>United-States</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <th>White</th>\n",
       "      <th>Male</th>\n",
       "      <td>34.0</td>\n",
       "      <td>Private</td>\n",
       "      <td>6.0</td>\n",
       "      <td>Never-married</td>\n",
       "      <td>Other-service</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>30.0</td>\n",
       "      <td>United-States</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   age  workclass  education-num      marital-status  \\\n",
       "  race      sex                                                        \n",
       "0 Non-white Male  25.0    Private            7.0       Never-married   \n",
       "1 White     Male  38.0    Private            9.0  Married-civ-spouse   \n",
       "2 White     Male  28.0  Local-gov           12.0  Married-civ-spouse   \n",
       "3 Non-white Male  44.0    Private           10.0  Married-civ-spouse   \n",
       "5 White     Male  34.0    Private            6.0       Never-married   \n",
       "\n",
       "                         occupation       race   sex  hours-per-week  \\\n",
       "  race      sex                                                        \n",
       "0 Non-white Male  Machine-op-inspct  Non-white  Male            40.0   \n",
       "1 White     Male    Farming-fishing      White  Male            50.0   \n",
       "2 White     Male    Protective-serv      White  Male            40.0   \n",
       "3 Non-white Male  Machine-op-inspct  Non-white  Male            40.0   \n",
       "5 White     Male      Other-service      White  Male            30.0   \n",
       "\n",
       "                 native-country  \n",
       "  race      sex                  \n",
       "0 Non-white Male  United-States  \n",
       "1 White     Male  United-States  \n",
       "2 White     Male  United-States  \n",
       "3 Non-white Male  United-States  \n",
       "5 White     Male  United-States  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X, y, sample_weight = fetch_adult()\n",
    "n_samp = 5000\n",
    "\n",
    "X = X.drop(['education', 'capital-gain', 'capital-loss', 'relationship'], axis=1)\n",
    "X = X[0:n_samp]\n",
    "y = y[0:n_samp]\n",
    "\n",
    "X.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Split the data into training and testing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "(X_train, X_test,\n",
    " y_train, y_test) = train_test_split(X, y, train_size=0.8, random_state=1234567)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Train a LGBM predictor on original data and compute accuracy and parity gap"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.835"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf = LGBMClassifier()\n",
    "clf.fit(X_train, y_train)\n",
    "\n",
    "y_pred = clf.predict(X_test)\n",
    "accuracy_score(y_test, y_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Parity gap equals -20.00%\n"
     ]
    }
   ],
   "source": [
    "# parity gap\n",
    "par_gap = statistical_parity_difference(y_test, y_pred, prot_attr=\"sex\", \n",
    "                                         priv_group=\"Male\", pos_label=\">50K\")\n",
    "print(f\"Parity gap equals {par_gap:.2%}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Therefore, a male person is 20\\% more likely than a female person to be predicted as earning more than 50k$/year."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Construct the adjacency matrix (causal graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# construct an adjacency matrix\n",
    "train_df = pd.concat([X_train, y_train], axis=1)\n",
    "adj_mat = pd.DataFrame(\n",
    "    np.zeros((len(train_df.columns), len(train_df.columns)), dtype=int),\n",
    "    index=train_df.columns.values,\n",
    "    columns=train_df.columns.values\n",
    ")\n",
    "\n",
    "# Construct the adjacency matrix of the causal graph\n",
    "adj_mat.at[[\"sex\", \"age\", \"native-country\", \"race\"],\n",
    "           [\"marital-status\", \"education-num\",\"workclass\", \"hours-per-week\", \"occupation\", \"annual-income\"]] = 1\n",
    "adj_mat.at[\"marital-status\",\n",
    "           [\"education-num\", \"workclass\", \"hours-per-week\", \"occupation\", \"annual-income\"]] = 1\n",
    "adj_mat.at[\"education-num\",\n",
    "           [\"workclass\", \"hours-per-week\", \"occupation\", \"annual-income\"]] = 1\n",
    "adj_mat.at[[\"workclass\", \"hours-per-week\", \"occupation\"],\n",
    "           \"annual-income\"] = 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Visualize the causal graph\n",
    "After constructing the causal model for the Adult dataset, we can visualize what it looks like:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"700pt\" height=\"500pt\" viewBox=\"0 0 700 500\" version=\"1.1\">\n<defs>\n<g>\n<symbol overflow=\"visible\" id=\"glyph0-0\">\n<path style=\"stroke:none;\" d=\"M 0.453125 0 L 0.453125 -10.042969 L 8.421875 -10.042969 L 8.421875 0 Z M 7.164062 -1.257812 L 7.164062 -8.785156 L 1.710938 -8.785156 L 1.710938 -1.257812 Z M 7.164062 -1.257812 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-1\">\n<path style=\"stroke:none;\" d=\"M 1.84375 -1.949219 C 1.84375 -1.59375 1.976562 -1.3125 2.234375 -1.109375 C 2.496094 -0.902344 2.804688 -0.800781 3.15625 -0.800781 C 3.589844 -0.800781 4.011719 -0.898438 4.414062 -1.101562 C 5.097656 -1.433594 5.441406 -1.976562 5.441406 -2.734375 L 5.441406 -3.726562 C 5.289062 -3.628906 5.097656 -3.550781 4.859375 -3.484375 C 4.625 -3.421875 4.390625 -3.375 4.164062 -3.351562 L 3.417969 -3.253906 C 2.972656 -3.195312 2.636719 -3.101562 2.414062 -2.972656 C 2.035156 -2.757812 1.84375 -2.417969 1.84375 -1.949219 Z M 4.828125 -4.4375 C 5.109375 -4.472656 5.296875 -4.589844 5.394531 -4.792969 C 5.449219 -4.902344 5.476562 -5.058594 5.476562 -5.265625 C 5.476562 -5.683594 5.328125 -5.988281 5.027344 -6.175781 C 4.730469 -6.367188 4.300781 -6.460938 3.746094 -6.460938 C 3.101562 -6.460938 2.648438 -6.285156 2.378906 -5.941406 C 2.226562 -5.75 2.128906 -5.464844 2.085938 -5.085938 L 0.9375 -5.085938 C 0.960938 -5.988281 1.253906 -6.617188 1.816406 -6.96875 C 2.378906 -7.320312 3.03125 -7.5 3.773438 -7.5 C 4.632812 -7.5 5.335938 -7.335938 5.871094 -7.007812 C 6.40625 -6.679688 6.671875 -6.167969 6.671875 -5.476562 L 6.671875 -1.257812 C 6.671875 -1.128906 6.699219 -1.027344 6.75 -0.949219 C 6.804688 -0.871094 6.914062 -0.835938 7.082031 -0.835938 C 7.136719 -0.835938 7.199219 -0.835938 7.265625 -0.84375 C 7.335938 -0.851562 7.40625 -0.859375 7.484375 -0.875 L 7.484375 0.0351562 C 7.292969 0.0898438 7.148438 0.125 7.046875 0.136719 C 6.945312 0.148438 6.8125 0.15625 6.636719 0.15625 C 6.214844 0.15625 5.90625 0.0078125 5.714844 -0.292969 C 5.613281 -0.453125 5.542969 -0.679688 5.503906 -0.96875 C 5.253906 -0.640625 4.890625 -0.359375 4.421875 -0.117188 C 3.953125 0.125 3.4375 0.246094 2.871094 0.246094 C 2.191406 0.246094 1.636719 0.0390625 1.207031 -0.371094 C 0.777344 -0.785156 0.5625 -1.300781 0.5625 -1.921875 C 0.5625 -2.601562 0.773438 -3.125 1.195312 -3.5 C 1.621094 -3.875 2.175781 -4.105469 2.863281 -4.191406 Z M 4.828125 -4.4375 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-2\">\n<path style=\"stroke:none;\" d=\"M 3.484375 -7.453125 C 4.058594 -7.453125 4.5625 -7.308594 4.992188 -7.027344 C 5.222656 -6.867188 5.460938 -6.636719 5.703125 -6.328125 L 5.703125 -7.253906 L 6.835938 -7.253906 L 6.835938 -0.59375 C 6.835938 0.335938 6.699219 1.070312 6.425781 1.605469 C 5.914062 2.601562 4.953125 3.097656 3.535156 3.097656 C 2.746094 3.097656 2.082031 2.921875 1.546875 2.566406 C 1.007812 2.214844 0.707031 1.660156 0.640625 0.910156 L 1.894531 0.910156 C 1.953125 1.238281 2.070312 1.492188 2.25 1.667969 C 2.527344 1.941406 2.964844 2.078125 3.5625 2.078125 C 4.503906 2.078125 5.121094 1.746094 5.414062 1.078125 C 5.585938 0.6875 5.667969 -0.0117188 5.652344 -1.019531 C 5.40625 -0.644531 5.109375 -0.367188 4.765625 -0.183594 C 4.417969 0 3.960938 0.0898438 3.390625 0.0898438 C 2.597656 0.0898438 1.902344 -0.191406 1.308594 -0.753906 C 0.714844 -1.316406 0.417969 -2.25 0.417969 -3.546875 C 0.417969 -4.773438 0.714844 -5.730469 1.316406 -6.417969 C 1.914062 -7.105469 2.640625 -7.453125 3.484375 -7.453125 Z M 5.703125 -3.691406 C 5.703125 -4.597656 5.515625 -5.269531 5.140625 -5.707031 C 4.765625 -6.144531 4.289062 -6.363281 3.710938 -6.363281 C 2.84375 -6.363281 2.253906 -5.957031 1.933594 -5.148438 C 1.765625 -4.714844 1.679688 -4.148438 1.679688 -3.445312 C 1.679688 -2.621094 1.847656 -1.992188 2.183594 -1.5625 C 2.519531 -1.132812 2.96875 -0.914062 3.535156 -0.914062 C 4.417969 -0.914062 5.039062 -1.316406 5.398438 -2.113281 C 5.601562 -2.5625 5.703125 -3.089844 5.703125 -3.691406 Z M 5.703125 -3.691406 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-3\">\n<path style=\"stroke:none;\" d=\"M 3.953125 -7.484375 C 4.472656 -7.484375 4.972656 -7.363281 5.460938 -7.121094 C 5.949219 -6.875 6.320312 -6.558594 6.578125 -6.171875 C 6.824219 -5.804688 6.984375 -5.375 7.070312 -4.882812 C 7.140625 -4.542969 7.179688 -4.007812 7.179688 -3.265625 L 1.8125 -3.265625 C 1.835938 -2.523438 2.007812 -1.929688 2.335938 -1.480469 C 2.664062 -1.03125 3.175781 -0.804688 3.863281 -0.804688 C 4.503906 -0.804688 5.015625 -1.019531 5.398438 -1.441406 C 5.617188 -1.6875 5.773438 -1.972656 5.867188 -2.296875 L 7.074219 -2.296875 C 7.042969 -2.027344 6.9375 -1.726562 6.757812 -1.398438 C 6.578125 -1.066406 6.375 -0.796875 6.152344 -0.585938 C 5.777344 -0.222656 5.316406 0.0234375 4.765625 0.148438 C 4.46875 0.222656 4.132812 0.257812 3.757812 0.257812 C 2.847656 0.257812 2.074219 -0.0703125 1.441406 -0.734375 C 0.808594 -1.398438 0.492188 -2.328125 0.492188 -3.519531 C 0.492188 -4.695312 0.8125 -5.652344 1.449219 -6.382812 C 2.085938 -7.117188 2.921875 -7.484375 3.953125 -7.484375 Z M 5.914062 -4.246094 C 5.863281 -4.777344 5.746094 -5.203125 5.5625 -5.523438 C 5.226562 -6.117188 4.664062 -6.414062 3.875 -6.414062 C 3.3125 -6.414062 2.835938 -6.207031 2.453125 -5.800781 C 2.070312 -5.390625 1.867188 -4.875 1.84375 -4.246094 Z M 5.914062 -4.246094 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-4\">\n<path style=\"stroke:none;\" d=\"M 1.46875 -7.320312 L 2.878906 -1.550781 L 4.304688 -7.320312 L 5.6875 -7.320312 L 7.125 -1.585938 L 8.621094 -7.320312 L 9.851562 -7.320312 L 7.726562 0 L 6.445312 0 L 4.957031 -5.667969 L 3.515625 0 L 2.234375 0 L 0.125 -7.320312 Z M 1.46875 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-5\">\n<path style=\"stroke:none;\" d=\"M 3.808594 -0.792969 C 4.625 -0.792969 5.183594 -1.101562 5.484375 -1.71875 C 5.789062 -2.335938 5.941406 -3.023438 5.941406 -3.78125 C 5.941406 -4.464844 5.832031 -5.019531 5.613281 -5.449219 C 5.265625 -6.125 4.667969 -6.460938 3.820312 -6.460938 C 3.070312 -6.460938 2.523438 -6.171875 2.179688 -5.597656 C 1.839844 -5.023438 1.667969 -4.332031 1.667969 -3.519531 C 1.667969 -2.742188 1.839844 -2.09375 2.179688 -1.570312 C 2.523438 -1.050781 3.066406 -0.792969 3.808594 -0.792969 Z M 3.855469 -7.53125 C 4.796875 -7.53125 5.597656 -7.21875 6.25 -6.589844 C 6.898438 -5.960938 7.226562 -5.035156 7.226562 -3.8125 C 7.226562 -2.632812 6.9375 -1.660156 6.363281 -0.890625 C 5.789062 -0.117188 4.898438 0.265625 3.691406 0.265625 C 2.683594 0.265625 1.882812 -0.0742188 1.292969 -0.753906 C 0.699219 -1.4375 0.402344 -2.351562 0.402344 -3.5 C 0.402344 -4.730469 0.714844 -5.710938 1.339844 -6.4375 C 1.964844 -7.167969 2.804688 -7.53125 3.855469 -7.53125 Z M 3.855469 -7.53125 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-6\">\n<path style=\"stroke:none;\" d=\"M 0.9375 -7.320312 L 2.105469 -7.320312 L 2.105469 -6.054688 C 2.203125 -6.300781 2.4375 -6.601562 2.808594 -6.957031 C 3.183594 -7.308594 3.613281 -7.484375 4.101562 -7.484375 C 4.125 -7.484375 4.164062 -7.484375 4.21875 -7.476562 C 4.273438 -7.472656 4.367188 -7.464844 4.5 -7.453125 L 4.5 -6.152344 C 4.425781 -6.164062 4.359375 -6.175781 4.296875 -6.179688 C 4.234375 -6.183594 4.167969 -6.1875 4.09375 -6.1875 C 3.476562 -6.1875 3 -5.988281 2.664062 -5.589844 C 2.332031 -5.191406 2.167969 -4.730469 2.167969 -4.210938 L 2.167969 0 L 0.9375 0 Z M 0.9375 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-7\">\n<path style=\"stroke:none;\" d=\"M 0.875 -10.042969 L 2.058594 -10.042969 L 2.058594 -4.210938 L 5.214844 -7.320312 L 6.789062 -7.320312 L 3.984375 -4.578125 L 6.945312 0 L 5.375 0 L 3.089844 -3.691406 L 2.058594 -2.75 L 2.058594 0 L 0.875 0 Z M 0.875 -10.042969 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-8\">\n<path style=\"stroke:none;\" d=\"M 3.726562 -7.53125 C 4.550781 -7.53125 5.222656 -7.332031 5.738281 -6.929688 C 6.257812 -6.53125 6.566406 -5.839844 6.671875 -4.859375 L 5.476562 -4.859375 C 5.402344 -5.3125 5.234375 -5.6875 4.976562 -5.984375 C 4.71875 -6.28125 4.300781 -6.433594 3.726562 -6.433594 C 2.941406 -6.433594 2.382812 -6.050781 2.042969 -5.285156 C 1.824219 -4.789062 1.714844 -4.175781 1.714844 -3.445312 C 1.714844 -2.710938 1.871094 -2.09375 2.179688 -1.59375 C 2.492188 -1.09375 2.976562 -0.839844 3.644531 -0.839844 C 4.15625 -0.839844 4.558594 -0.996094 4.855469 -1.308594 C 5.15625 -1.621094 5.363281 -2.046875 5.476562 -2.589844 L 6.671875 -2.589844 C 6.535156 -1.621094 6.195312 -0.910156 5.648438 -0.460938 C 5.101562 -0.0117188 4.398438 0.210938 3.546875 0.210938 C 2.589844 0.210938 1.828125 -0.136719 1.257812 -0.835938 C 0.6875 -1.535156 0.402344 -2.410156 0.402344 -3.460938 C 0.402344 -4.746094 0.714844 -5.746094 1.339844 -6.460938 C 1.964844 -7.175781 2.757812 -7.53125 3.726562 -7.53125 Z M 3.726562 -7.53125 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-9\">\n<path style=\"stroke:none;\" d=\"M 0.9375 -10.042969 L 2.167969 -10.042969 L 2.167969 0 L 0.9375 0 Z M 0.9375 -10.042969 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-10\">\n<path style=\"stroke:none;\" d=\"M 1.632812 -2.296875 C 1.671875 -1.886719 1.773438 -1.570312 1.941406 -1.351562 C 2.25 -0.957031 2.789062 -0.757812 3.554688 -0.757812 C 4.011719 -0.757812 4.410156 -0.859375 4.757812 -1.054688 C 5.105469 -1.253906 5.277344 -1.5625 5.277344 -1.976562 C 5.277344 -2.289062 5.136719 -2.53125 4.859375 -2.695312 C 4.683594 -2.792969 4.332031 -2.910156 3.808594 -3.042969 L 2.828125 -3.289062 C 2.203125 -3.445312 1.746094 -3.617188 1.449219 -3.808594 C 0.921875 -4.140625 0.65625 -4.601562 0.65625 -5.1875 C 0.65625 -5.882812 0.90625 -6.441406 1.40625 -6.871094 C 1.90625 -7.296875 2.574219 -7.511719 3.417969 -7.511719 C 4.519531 -7.511719 5.316406 -7.1875 5.804688 -6.542969 C 6.109375 -6.132812 6.257812 -5.691406 6.25 -5.214844 L 5.085938 -5.214844 C 5.0625 -5.492188 4.964844 -5.746094 4.792969 -5.976562 C 4.507812 -6.296875 4.019531 -6.460938 3.320312 -6.460938 C 2.855469 -6.460938 2.503906 -6.371094 2.265625 -6.195312 C 2.027344 -6.015625 1.90625 -5.78125 1.90625 -5.488281 C 1.90625 -5.171875 2.0625 -4.914062 2.378906 -4.722656 C 2.5625 -4.609375 2.828125 -4.507812 3.1875 -4.421875 L 4 -4.226562 C 4.882812 -4.011719 5.476562 -3.804688 5.777344 -3.601562 C 6.253906 -3.289062 6.492188 -2.792969 6.492188 -2.117188 C 6.492188 -1.46875 6.246094 -0.90625 5.753906 -0.429688 C 5.257812 0.0429688 4.503906 0.28125 3.492188 0.28125 C 2.402344 0.28125 1.632812 0.03125 1.179688 -0.460938 C 0.726562 -0.957031 0.484375 -1.566406 0.453125 -2.296875 Z M 1.632812 -2.296875 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-11\">\n<path style=\"stroke:none;\" d=\"M 1.679688 -3.574219 C 1.679688 -2.789062 1.847656 -2.136719 2.179688 -1.605469 C 2.511719 -1.078125 3.046875 -0.8125 3.78125 -0.8125 C 4.351562 -0.8125 4.816406 -1.058594 5.183594 -1.546875 C 5.550781 -2.039062 5.734375 -2.742188 5.734375 -3.65625 C 5.734375 -4.582031 5.546875 -5.265625 5.167969 -5.710938 C 4.789062 -6.15625 4.324219 -6.378906 3.765625 -6.378906 C 3.148438 -6.378906 2.644531 -6.140625 2.257812 -5.667969 C 1.875 -5.195312 1.679688 -4.496094 1.679688 -3.574219 Z M 3.535156 -7.453125 C 4.09375 -7.453125 4.5625 -7.332031 4.941406 -7.09375 C 5.160156 -6.957031 5.410156 -6.71875 5.6875 -6.378906 L 5.6875 -10.078125 L 6.871094 -10.078125 L 6.871094 0 L 5.761719 0 L 5.761719 -1.019531 C 5.476562 -0.566406 5.136719 -0.242188 4.742188 -0.0390625 C 4.351562 0.160156 3.902344 0.257812 3.398438 0.257812 C 2.582031 0.257812 1.875 -0.0820312 1.277344 -0.769531 C 0.679688 -1.453125 0.382812 -2.367188 0.382812 -3.507812 C 0.382812 -4.574219 0.65625 -5.496094 1.199219 -6.277344 C 1.742188 -7.058594 2.523438 -7.453125 3.535156 -7.453125 Z M 3.535156 -7.453125 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-12\">\n<path style=\"stroke:none;\" d=\"M 2.132812 -7.320312 L 2.132812 -2.460938 C 2.132812 -2.085938 2.191406 -1.78125 2.3125 -1.546875 C 2.53125 -1.109375 2.9375 -0.890625 3.535156 -0.890625 C 4.390625 -0.890625 4.972656 -1.273438 5.285156 -2.039062 C 5.453125 -2.449219 5.539062 -3.011719 5.539062 -3.726562 L 5.539062 -7.320312 L 6.765625 -7.320312 L 6.765625 0 L 5.605469 0 L 5.617188 -1.078125 C 5.460938 -0.800781 5.261719 -0.566406 5.023438 -0.375 C 4.554688 0.0078125 3.984375 0.199219 3.316406 0.199219 C 2.273438 0.199219 1.5625 -0.148438 1.183594 -0.847656 C 0.976562 -1.222656 0.875 -1.71875 0.875 -2.34375 L 0.875 -7.320312 Z M 2.132812 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-13\">\n<path style=\"stroke:none;\" d=\"M 1.148438 -9.367188 L 2.390625 -9.367188 L 2.390625 -7.320312 L 3.5625 -7.320312 L 3.5625 -6.316406 L 2.390625 -6.316406 L 2.390625 -1.539062 C 2.390625 -1.28125 2.480469 -1.113281 2.652344 -1.023438 C 2.75 -0.976562 2.90625 -0.949219 3.132812 -0.949219 C 3.191406 -0.949219 3.253906 -0.953125 3.320312 -0.953125 C 3.390625 -0.957031 3.46875 -0.960938 3.5625 -0.96875 L 3.5625 0 C 3.421875 0.0390625 3.273438 0.0703125 3.121094 0.0898438 C 2.96875 0.109375 2.804688 0.117188 2.625 0.117188 C 2.050781 0.117188 1.660156 -0.03125 1.457031 -0.324219 C 1.25 -0.617188 1.148438 -1 1.148438 -1.46875 L 1.148438 -6.316406 L 0.15625 -6.316406 L 0.15625 -7.320312 L 1.148438 -7.320312 Z M 1.148438 -9.367188 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-14\">\n<path style=\"stroke:none;\" d=\"M 0.902344 -7.289062 L 2.152344 -7.289062 L 2.152344 0 L 0.902344 0 Z M 0.902344 -10.042969 L 2.152344 -10.042969 L 2.152344 -8.648438 L 0.902344 -8.648438 Z M 0.902344 -10.042969 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-15\">\n<path style=\"stroke:none;\" d=\"M 0.902344 -7.320312 L 2.070312 -7.320312 L 2.070312 -6.28125 C 2.417969 -6.710938 2.785156 -7.019531 3.171875 -7.203125 C 3.558594 -7.390625 3.988281 -7.484375 4.464844 -7.484375 C 5.503906 -7.484375 6.203125 -7.125 6.570312 -6.398438 C 6.769531 -6 6.871094 -5.433594 6.871094 -4.695312 L 6.871094 0 L 5.617188 0 L 5.617188 -4.613281 C 5.617188 -5.0625 5.554688 -5.421875 5.421875 -5.695312 C 5.203125 -6.148438 4.804688 -6.378906 4.230469 -6.378906 C 3.9375 -6.378906 3.699219 -6.347656 3.515625 -6.289062 C 3.175781 -6.1875 2.878906 -5.988281 2.625 -5.6875 C 2.421875 -5.445312 2.285156 -5.195312 2.226562 -4.9375 C 2.164062 -4.679688 2.132812 -4.3125 2.132812 -3.835938 L 2.132812 0 L 0.902344 0 Z M 0.902344 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-16\">\n<path style=\"stroke:none;\" d=\"M 0.582031 -4.53125 L 4.011719 -4.53125 L 4.011719 -3.265625 L 0.582031 -3.265625 Z M 0.582031 -4.53125 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-17\">\n<path style=\"stroke:none;\" d=\"M 0.902344 -7.320312 L 2.117188 -7.320312 L 2.117188 -6.28125 C 2.410156 -6.640625 2.675781 -6.90625 2.914062 -7.070312 C 3.320312 -7.347656 3.777344 -7.484375 4.292969 -7.484375 C 4.875 -7.484375 5.34375 -7.34375 5.703125 -7.054688 C 5.902344 -6.890625 6.085938 -6.648438 6.25 -6.328125 C 6.523438 -6.722656 6.84375 -7.011719 7.210938 -7.203125 C 7.582031 -7.390625 7.996094 -7.484375 8.457031 -7.484375 C 9.441406 -7.484375 10.109375 -7.128906 10.464844 -6.417969 C 10.65625 -6.035156 10.753906 -5.519531 10.753906 -4.875 L 10.753906 0 L 9.476562 0 L 9.476562 -5.085938 C 9.476562 -5.574219 9.351562 -5.910156 9.109375 -6.089844 C 8.867188 -6.273438 8.566406 -6.363281 8.21875 -6.363281 C 7.734375 -6.363281 7.316406 -6.203125 6.96875 -5.878906 C 6.621094 -5.554688 6.445312 -5.015625 6.445312 -4.257812 L 6.445312 0 L 5.195312 0 L 5.195312 -4.777344 C 5.195312 -5.273438 5.136719 -5.636719 5.015625 -5.867188 C 4.828125 -6.207031 4.480469 -6.378906 3.972656 -6.378906 C 3.507812 -6.378906 3.085938 -6.199219 2.703125 -5.835938 C 2.324219 -5.476562 2.132812 -4.828125 2.132812 -3.882812 L 2.132812 0 L 0.902344 0 Z M 0.902344 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-18\">\n<path style=\"stroke:none;\" d=\"M 3.992188 -0.828125 C 4.566406 -0.828125 5.042969 -1.066406 5.425781 -1.546875 C 5.804688 -2.027344 5.996094 -2.75 5.996094 -3.703125 C 5.996094 -4.289062 5.910156 -4.789062 5.742188 -5.210938 C 5.421875 -6.015625 4.839844 -6.417969 3.992188 -6.417969 C 3.140625 -6.417969 2.554688 -5.992188 2.242188 -5.140625 C 2.074219 -4.683594 1.988281 -4.105469 1.988281 -3.40625 C 1.988281 -2.839844 2.074219 -2.359375 2.242188 -1.960938 C 2.5625 -1.203125 3.144531 -0.828125 3.992188 -0.828125 Z M 0.804688 -7.289062 L 2.003906 -7.289062 L 2.003906 -6.316406 C 2.25 -6.648438 2.519531 -6.90625 2.808594 -7.089844 C 3.222656 -7.363281 3.710938 -7.5 4.273438 -7.5 C 5.101562 -7.5 5.804688 -7.179688 6.382812 -6.546875 C 6.960938 -5.910156 7.253906 -5 7.253906 -3.820312 C 7.253906 -2.226562 6.835938 -1.085938 6 -0.402344 C 5.472656 0.03125 4.859375 0.246094 4.15625 0.246094 C 3.605469 0.246094 3.140625 0.125 2.769531 -0.117188 C 2.550781 -0.253906 2.304688 -0.488281 2.039062 -0.820312 L 2.039062 2.917969 L 0.804688 2.917969 Z M 0.804688 -7.289062 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-19\">\n<path style=\"stroke:none;\" d=\"M 0.203125 -7.320312 L 1.796875 -7.320312 L 3.480469 -4.742188 L 5.179688 -7.320312 L 6.679688 -7.289062 L 4.210938 -3.753906 L 6.789062 0 L 5.214844 0 L 3.398438 -2.75 L 1.632812 0 L 0.0742188 0 L 2.652344 -3.753906 Z M 0.203125 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-20\">\n<path style=\"stroke:none;\" d=\"M 0.902344 -10.078125 L 2.132812 -10.078125 L 2.132812 -6.328125 C 2.425781 -6.699219 2.6875 -6.960938 2.917969 -7.109375 C 3.316406 -7.367188 3.808594 -7.5 4.402344 -7.5 C 5.464844 -7.5 6.183594 -7.128906 6.5625 -6.382812 C 6.765625 -5.976562 6.871094 -5.417969 6.871094 -4.695312 L 6.871094 0 L 5.605469 0 L 5.605469 -4.613281 C 5.605469 -5.152344 5.539062 -5.546875 5.398438 -5.796875 C 5.175781 -6.199219 4.757812 -6.398438 4.140625 -6.398438 C 3.632812 -6.398438 3.167969 -6.222656 2.753906 -5.871094 C 2.339844 -5.519531 2.132812 -4.859375 2.132812 -3.882812 L 2.132812 0 L 0.902344 0 Z M 0.902344 -10.078125 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-21\">\n<path style=\"stroke:none;\" d=\"M 1.503906 -7.320312 L 3.460938 -1.359375 L 5.503906 -7.320312 L 6.851562 -7.320312 L 4.085938 0 L 2.773438 0 L 0.0742188 -7.320312 Z M 1.503906 -7.320312 \"/>\n</symbol>\n<symbol overflow=\"visible\" id=\"glyph0-22\">\n<path style=\"stroke:none;\" d=\"M 5.476562 -7.320312 L 6.835938 -7.320312 C 6.664062 -6.851562 6.277344 -5.78125 5.679688 -4.109375 C 5.234375 -2.851562 4.859375 -1.824219 4.558594 -1.03125 C 3.847656 0.835938 3.347656 1.976562 3.054688 2.386719 C 2.765625 2.796875 2.261719 3 1.550781 3 C 1.378906 3 1.246094 2.992188 1.152344 2.980469 C 1.058594 2.96875 0.945312 2.941406 0.804688 2.90625 L 0.804688 1.785156 C 1.019531 1.84375 1.175781 1.878906 1.273438 1.894531 C 1.367188 1.90625 1.453125 1.914062 1.523438 1.914062 C 1.75 1.914062 1.917969 1.875 2.027344 1.800781 C 2.132812 1.726562 2.222656 1.632812 2.296875 1.523438 C 2.320312 1.488281 2.402344 1.300781 2.542969 0.964844 C 2.683594 0.625 2.785156 0.375 2.851562 0.210938 L 0.144531 -7.320312 L 1.539062 -7.320312 L 3.5 -1.359375 Z M 5.476562 -7.320312 \"/>\n</symbol>\n</g>\n</defs>\n<g id=\"surface2\">\n<rect x=\"0\" y=\"0\" width=\"700\" height=\"500\" style=\"fill:rgb(100%,100%,100%);fill-opacity:1;stroke:none;\"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 232.425781 119.996094 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 237.539062 106.675781 L 236.753906 121.65625 L 228.097656 118.332031 L 237.539062 106.675781 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 251.875 337.4375 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 264.527344 330.84375 L 254.019531 341.546875 L 249.734375 333.328125 L 264.527344 330.84375 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 363.585938 250.308594 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 375.59375 242.605469 L 366.085938 254.207031 L 361.082031 246.40625 L 375.59375 242.605469 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 292.851562 430.332031 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 306.957031 432.480469 L 292.15625 434.914062 L 293.550781 425.75 L 306.957031 432.480469 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 435.0625 385.417969 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 449.300781 384.546875 L 435.34375 390.046875 L 434.777344 380.792969 L 449.300781 384.546875 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 123.167969 404.515625 L 224.109375 247.074219 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 231.808594 235.066406 L 228.011719 249.578125 L 220.207031 244.574219 L 231.808594 235.066406 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 255.464844 60 L 257.1875 128.726562 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 257.542969 142.988281 L 252.550781 128.84375 L 261.820312 128.613281 L 257.542969 142.988281 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 308.867188 307.738281 L 269.007812 122.824219 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 266 108.878906 L 273.539062 121.847656 L 264.476562 123.800781 L 266 108.878906 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 308.867188 307.738281 L 334.65625 379.519531 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 339.480469 392.945312 L 330.296875 381.085938 L 339.019531 377.953125 L 339.480469 392.945312 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 308.867188 307.738281 L 439.28125 358.269531 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 452.585938 363.425781 L 437.609375 362.59375 L 440.957031 353.949219 L 452.585938 363.425781 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 308.867188 307.738281 L 284.496094 251.875 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 278.789062 238.800781 L 288.742188 250.023438 L 280.246094 253.730469 L 278.789062 238.800781 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 417.679688 215.609375 L 301.839844 104.488281 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 291.546875 94.613281 L 305.050781 101.144531 L 298.632812 107.832031 L 291.546875 94.613281 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 417.679688 215.609375 L 357.914062 266.210938 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 347.027344 275.429688 L 354.917969 262.671875 L 360.910156 269.746094 L 347.027344 275.429688 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 417.679688 215.609375 L 373.320312 378.003906 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 369.5625 391.765625 L 368.851562 376.785156 L 377.792969 379.226562 L 369.5625 391.765625 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 417.679688 215.609375 L 470.859375 323.816406 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 477.152344 336.617188 L 466.699219 325.859375 L 475.019531 321.769531 L 477.152344 336.617188 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 417.679688 215.609375 L 322.417969 202.039062 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 308.296875 200.027344 L 323.074219 197.449219 L 321.765625 206.625 L 308.296875 200.027344 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 356.386719 440 L 282.410156 252.742188 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 277.167969 239.476562 L 286.71875 251.039062 L 278.097656 254.445312 L 277.167969 239.476562 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 312.800781 89.03125 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 300.070312 82.585938 L 314.894531 84.894531 L 310.707031 93.167969 L 300.070312 82.585938 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 372.324219 297.574219 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 358.238281 299.832031 L 371.589844 292.996094 L 373.058594 302.152344 L 358.238281 299.832031 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 480.972656 226.742188 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 466.921875 224.269531 L 481.777344 222.175781 L 480.171875 231.304688 L 466.921875 224.269531 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 410.1875 404.851562 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 398.246094 412.652344 L 407.652344 400.96875 L 412.722656 408.730469 L 398.246094 412.652344 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 546.964844 338.488281 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 536.363281 348.03125 L 543.863281 335.042969 L 550.066406 341.929688 L 536.363281 348.03125 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 640 254.707031 L 322.234375 203.246094 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 308.152344 200.964844 L 322.976562 198.671875 L 321.492188 207.824219 L 308.152344 200.964844 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 318.996094 69.679688 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 304.894531 67.53125 L 319.695312 65.097656 L 318.300781 74.261719 L 304.894531 67.53125 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 357.722656 265.984375 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 346.878906 275.253906 L 354.710938 262.460938 L 360.734375 269.507812 L 346.878906 275.253906 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 466.375 173.667969 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 455.5625 182.980469 L 463.347656 170.15625 L 469.398438 177.179688 L 455.5625 182.980469 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 388.101562 384.105469 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 381.0625 396.511719 L 384.070312 381.816406 L 392.132812 386.390625 L 381.0625 396.511719 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 510.089844 318.152344 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 507.671875 332.214844 L 505.519531 317.367188 L 514.65625 318.9375 L 507.671875 332.214844 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 546.8125 104.386719 L 320.222656 174.082031 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 306.585938 178.273438 L 318.859375 169.648438 L 321.585938 178.511719 L 306.585938 178.273438 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 499.207031 381.492188 L 309.367188 232.628906 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 298.140625 223.828125 L 312.226562 228.980469 L 306.507812 236.277344 L 298.140625 223.828125 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 209.617188 105.035156 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 219.792969 95.039062 L 212.867188 108.339844 L 206.371094 101.726562 L 219.792969 95.039062 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 246.15625 293.691406 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 260.074219 296.808594 L 245.140625 298.214844 L 247.167969 289.167969 L 260.074219 296.808594 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 353.742188 222.113281 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 367.9375 220.671875 L 354.210938 226.726562 L 353.273438 217.503906 L 367.9375 220.671875 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 302.117188 405.578125 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 314.164062 413.21875 L 299.636719 409.492188 L 304.601562 401.664062 L 314.164062 413.21875 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 437.5625 363.316406 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 451.246094 367.351562 L 436.253906 367.761719 L 438.875 358.871094 L 451.246094 367.351562 \"/>\n<path style=\"fill:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(26.666667%,26.666667%,26.666667%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 60 252 L 197.1875 211.265625 \"/>\n<path style=\" stroke:none;fill-rule:nonzero;fill:rgb(26.666667%,26.666667%,26.666667%);fill-opacity:1;\" d=\"M 210.863281 207.207031 L 198.507812 215.710938 L 195.867188 206.824219 L 210.863281 207.207031 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 173.167969 404.515625 C 173.167969 432.128906 150.78125 454.515625 123.167969 454.515625 C 95.554688 454.515625 73.167969 432.128906 73.167969 404.515625 C 73.167969 376.898438 95.554688 354.515625 123.167969 354.515625 C 150.78125 354.515625 173.167969 376.898438 173.167969 404.515625 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 305.464844 60 C 305.464844 87.613281 283.078125 110 255.464844 110 C 227.851562 110 205.464844 87.613281 205.464844 60 C 205.464844 32.386719 227.851562 10 255.464844 10 C 283.078125 10 305.464844 32.386719 305.464844 60 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 358.867188 307.738281 C 358.867188 335.351562 336.480469 357.738281 308.867188 357.738281 C 281.253906 357.738281 258.867188 335.351562 258.867188 307.738281 C 258.867188 280.121094 281.253906 257.738281 308.867188 257.738281 C 336.480469 257.738281 358.867188 280.121094 358.867188 307.738281 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 467.679688 215.609375 C 467.679688 243.222656 445.292969 265.609375 417.679688 265.609375 C 390.066406 265.609375 367.679688 243.222656 367.679688 215.609375 C 367.679688 187.996094 390.066406 165.609375 417.679688 165.609375 C 445.292969 165.609375 467.679688 187.996094 467.679688 215.609375 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 406.386719 440 C 406.386719 467.613281 384.003906 490 356.386719 490 C 328.773438 490 306.386719 467.613281 306.386719 440 C 306.386719 412.386719 328.773438 390 356.386719 390 C 384.003906 390 406.386719 412.386719 406.386719 440 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 690 254.707031 C 690 282.320312 667.613281 304.707031 640 304.707031 C 612.386719 304.707031 590 282.320312 590 254.707031 C 590 227.09375 612.386719 204.707031 640 204.707031 C 667.613281 204.707031 690 227.09375 690 254.707031 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 596.8125 104.386719 C 596.8125 132 574.429688 154.386719 546.8125 154.386719 C 519.199219 154.386719 496.8125 132 496.8125 104.386719 C 496.8125 76.773438 519.199219 54.386719 546.8125 54.386719 C 574.429688 54.386719 596.8125 76.773438 596.8125 104.386719 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 549.207031 381.492188 C 549.207031 409.105469 526.820312 431.492188 499.207031 431.492188 C 471.59375 431.492188 449.207031 409.105469 449.207031 381.492188 C 449.207031 353.878906 471.59375 331.492188 499.207031 331.492188 C 526.820312 331.492188 549.207031 353.878906 549.207031 381.492188 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 110 252 C 110 279.617188 87.613281 302 60 302 C 32.386719 302 10 279.617188 10 252 C 10 224.386719 32.386719 202 60 202 C 87.613281 202 110 224.386719 110 252 \"/>\n<path style=\"fill-rule:nonzero;fill:rgb(100%,0%,0%);fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;\" d=\"M 308.796875 192.972656 C 308.796875 220.585938 286.410156 242.972656 258.796875 242.972656 C 231.179688 242.972656 208.796875 220.585938 208.796875 192.972656 C 208.796875 165.359375 231.179688 142.972656 258.796875 142.972656 C 286.410156 142.972656 308.796875 165.359375 308.796875 192.972656 \"/>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-1\" x=\"111.511719\" y=\"409.875\"/>\n  <use xlink:href=\"#glyph0-2\" x=\"119.297852\" y=\"409.875\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"127.083984\" y=\"409.875\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-4\" x=\"224.929688\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"235.040039\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-6\" x=\"242.826172\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-7\" x=\"247.488281\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"254.488281\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-9\" x=\"261.488281\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"264.598633\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-10\" x=\"272.384766\" y=\"66.628906\"/>\n  <use xlink:href=\"#glyph0-10\" x=\"279.384766\" y=\"66.628906\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-3\" x=\"262.769531\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-11\" x=\"270.555664\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"278.341797\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"286.12793\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"293.12793\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"300.914062\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-14\" x=\"304.803711\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"307.914062\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"315.700195\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"323.486328\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"328.148438\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"335.93457\" y=\"314.386719\"/>\n  <use xlink:href=\"#glyph0-17\" x=\"343.720703\" y=\"314.386719\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-17\" x=\"375.472656\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"387.134766\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-6\" x=\"394.920898\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-14\" x=\"399.583008\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"402.693359\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"406.583008\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-9\" x=\"414.369141\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"417.479492\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-10\" x=\"422.141602\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"429.141602\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"433.03125\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"440.817383\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"444.707031\" y=\"222.242188\"/>\n  <use xlink:href=\"#glyph0-10\" x=\"452.493164\" y=\"222.242188\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-5\" x=\"322.785156\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"330.571289\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"337.571289\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"344.571289\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-18\" x=\"352.357422\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"360.143555\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"367.929688\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-14\" x=\"371.819336\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"374.929688\" y=\"446.628906\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"382.71582\" y=\"446.628906\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-6\" x=\"626.21875\" y=\"260.085938\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"630.880859\" y=\"260.085938\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"638.666992\" y=\"260.085938\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"645.666992\" y=\"260.085938\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-10\" x=\"535.800781\" y=\"109.753906\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"542.800781\" y=\"109.753906\"/>\n  <use xlink:href=\"#glyph0-19\" x=\"550.586914\" y=\"109.753906\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-20\" x=\"450.152344\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"457.938477\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"465.724609\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-6\" x=\"473.510742\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-10\" x=\"478.172852\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"485.172852\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-18\" x=\"489.834961\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"497.621094\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-6\" x=\"505.407227\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"510.069336\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-4\" x=\"514.731445\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"524.841797\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"532.62793\" y=\"388.140625\"/>\n  <use xlink:href=\"#glyph0-7\" x=\"540.414062\" y=\"388.140625\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-15\" x=\"15.664062\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"23.450195\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"31.236328\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-14\" x=\"35.125977\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-21\" x=\"38.236328\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"45.236328\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"53.022461\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"57.68457\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"64.68457\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"72.470703\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"80.256836\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-13\" x=\"88.042969\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-6\" x=\"91.932617\" y=\"258.632812\"/>\n  <use xlink:href=\"#glyph0-22\" x=\"96.594727\" y=\"258.632812\"/>\n</g>\n<g style=\"fill:rgb(0%,0%,0%);fill-opacity:1;\">\n  <use xlink:href=\"#glyph0-1\" x=\"212.902344\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"220.688477\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"228.474609\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-12\" x=\"236.260742\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-1\" x=\"244.046875\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-9\" x=\"251.833008\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-16\" x=\"254.943359\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-14\" x=\"259.605469\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-15\" x=\"262.71582\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-8\" x=\"270.501953\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-5\" x=\"277.501953\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-17\" x=\"285.288086\" y=\"199.605469\"/>\n  <use xlink:href=\"#glyph0-3\" x=\"296.950195\" y=\"199.605469\"/>\n</g>\n</g>\n</svg>\n",
      "text/plain": [
       "<igraph.drawing.Plot at 0x7fd452ca9d00>"
      ]
     },
     "execution_count": 8,
     "metadata": {
      "image/svg+xml": {
       "isolated": true
      }
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "G = igraph.Graph.Adjacency(matrix=adj_mat.values.tolist())\n",
    "G.vs['label'] = adj_mat.columns\n",
    "igraph.plot(G, bbox=(0, 0, 700, 500), vertex_size=100, margin=60)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Instantiate and run FairAdapt\n",
    "In the final step we run `FairAdapt` to perform the data adaptation. We use sex as the protected attribute."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "FA = FairAdapt(prot_attr=\"sex\", adj_mat=adj_mat)\n",
    "Xf_train, yf_train, Xf_test = FA.fit_transform(X_train, y_train, X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Retrain LGBM and check whether discrimination was removed\n",
    "After the adaptation, the same classifier is used again, but on the fair version of the data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.779"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clf_fair = LGBMClassifier()\n",
    "clf_fair.fit(Xf_train, yf_train)\n",
    "\n",
    "yf_pred = clf_fair.predict(Xf_test)\n",
    "accuracy_score(y_test, yf_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fair parity gap equals -4.17%\n"
     ]
    }
   ],
   "source": [
    "# fair parity gap\n",
    "fair_gap = statistical_parity_difference(y_test, yf_pred, prot_attr=\"sex\", \n",
    "                                         priv_group=\"Male\", pos_label=\">50K\")\n",
    "print(f\"Fair parity gap equals {fair_gap:.2%}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "After applying `FairAdapt`, we notice that the parity gap between the group was decreased."
   ]
  }
 ],
 "metadata": {
  "hide_input": false,
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.12"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": true,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "313px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
